<template>
  <div>
    <div v-if="flag">
      <remove-pic-watermark
        ref="removeCore"
        @maskResult="onMaskEnd"
      />
    </div>
  </div>
</template>

<script>
export default {
  components: {
    RemovePicWatermark: () => import('./Core')
  },
  data() {
    return {
      flag: false
    }
  },
  created() {},
  methods: {
    onMaskStart(data) {
      this.flag = true
      this.$nextTick(() => {
        setTimeout(() => {
          this.$refs.removeCore.show(data)
        }, 100)
      })
    },
    claenData() {
      this.flag = false
    },
    onMaskEnd(data) {
      this.flag = false
      this.$emit('maskEnd', data)
    }
  }
}
</script>

<style scoped>
</style>
